/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gem.model.core;

import java.beans.PropertyChangeListener;

/**
 *
 * @author Dusan
 */
public interface DepartmentCatalogueModel
{
    public java.util.Collection<Department> listDepartments( boolean reload ) throws java.sql.SQLException;

    public void addNewDepartment( Department d ) throws java.sql.SQLException;
    public void addNewDepartment( String s ) throws java.sql.SQLException;
    public Department findDepartment( String name )throws java.sql.SQLException;
    public Department getDepartment( int index ) throws java.sql.SQLException;
    public void deleteDepartment( Department d )throws java.sql.SQLException;
    public void renameDepartment( Department d ) throws java.sql.SQLException;

    public void addNewScienceDomain( ScienceDomain sd ) throws java.sql.SQLException;
    public void addNewScienceDomain( Department d, String sd ) throws java.sql.SQLException;
    public ScienceDomain findScienceDomain( String name ) throws java.sql.SQLException;
    public ScienceDomain getScienceDomain( Department parent, int index ) throws java.sql.SQLException;
    public void deleteScienceDomain( ScienceDomain sd ) throws java.sql.SQLException;
    public void renameScienceDomain( ScienceDomain sd ) throws java.sql.SQLException;
    public void moveScienceDomain( ScienceDomain sd, Department newDepartment ) throws java.sql.SQLException;

    public void addNewCourse( Course c ) throws java.sql.SQLException;
    public void addNewCourse( ScienceDomain parent, String name ) throws java.sql.SQLException;
    public Course findCourse( String name ) throws java.sql.SQLException;
    public Course getCourse( ScienceDomain parent, int index ) throws java.sql.SQLException;
    public void deleteCourse( Course c ) throws java.sql.SQLException;
    public void renameCourse( Course c ) throws java.sql.SQLException;
    public void moveCourse( Course c, ScienceDomain newsDomain) throws java.sql.SQLException;

    void addDepartmentListener( DepartmentListener dl );
    void removeDepartmentListener( DepartmentListener dl );
}
